package booroo.basic;

public class Pract_P236_Ex1 {

	public static void main(String[] args) {
		Song s = new Song();
		s.setTitle("Dancing Queen");
		s.setArtist("ABBA");
		s.setAlbum("Arrival");
		s.setComposer(new String[]{"베니 앤더슨","비에른 울바에우스","스틱 앤더슨"});
		s.setYear(1976);
		s.setTrack(2);
		System.out.println(s.toString());
	}
}
class Song{
	private String title, artist, album;
	private String composer[];
	private int year, track;
	
	public void setTitle(String title){
		this.title = title;
	}
	public String getTitle(){
		return title;
	}
	public void setArtist(String artist){
		this.artist = artist;
	}
	public String getArtist(){
		return artist;
	}
	public void setAlbum(String album){
		this.album = album;
	}
	public String getAlbum(){
		return album;
	}
	public void setComposer(String composer[]){
		this.composer = composer;
	}
	public String[] getComposer(){
		return composer;
	}
	public void setYear(int year){
		this.year = year;
	}
	public int getYear(){
		return year;
	}
	public void setTrack(int track){
		this.track = track;
	}
	public int getTrack(){
		return track;
	}
	@Override
	public String toString() {
		String result = "";
		result = result + "노래제목 : " + title + " ";
		result += "가수 : " + artist + " ";
		result += "앨범제목 : " + album + " ";
		result += "작곡가 : ";
		for(int i = 0;i < composer.length;++i){
			result += composer[i] + " ";	
		}
		result += "발표연도 : " + year + " ";
		result += "트랙번호 : " + track + " ";
		return result;
		}
}

	
